/**
 *  Copyright 2010 ShenYang voole Co. Ltd.
 *  All right reserved. 
 */
package com.dianning.dao;

import java.util.List;

import com.dianning.bean.AdAds;
import com.dianning.bean.AdSpace;
import com.dianning.bean.Admin;
import com.dianning.bean.Area;
import com.dianning.bean.Channel;
import com.dianning.bean.Visitor;

/**
 * 功能描述:广告位操作接口
 *
 * 创建日期 Apr 10, 2010
 *
 * @author zhangbaochao
 *
 * @version 1.0
 *
 */
public interface ChannelDAO {
	
	/**
	 * 保存Channel对象
	 * 
	 * @param channel
	 * 			Channel对象
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel saveChannel(Channel channel);
	/**
	 * 保存或更新Channel对象
	 * 
	 * @param channel
	 * 			Channel对象
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel saveOrUpdateChannel(Channel channel);
	/**
	 * 保存Channel对象
	 * 
	 * @param channel
	 * 			Channel对象
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel updateChannel(Channel channel);
	
	/**
	 * 根据主键ID获取Channel对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return Channel
	 * 			Channel对象
	 */
	public Channel findChannelById(long id);
	
	/**
	 * 获取Channel个数
	 * 
	 * @return int
	 * 			Channel个数
	 */
	public long getChannelNum();
	
	/**
	 * 获取Channel列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @param firstResult
	 *            int
	 * @param maxResults
	 *            int
	 * @return List
	 * 			Area对象列表
	 */
	public List findChannels(String orderby, int ascOrDesc, int firstResult, int maxResults);
	
	/**
	 * 获取Channel列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @return List
	 * 			Area对象列表
	 */
	public List findChannels(String orderby, int ascOrDesc);
	
	public Channel findChannelByCode(String code);
}
